Skip to content

fix(ui): route file reveal actions through app command#96

Merged
vanloctech merged 1 commit into
vanloctech:mainfrom
anhtahaylove:pr/open-file-location-command
Jul 3, 2026
Merged

fix(ui): route file reveal actions through app command#96
vanloctech merged 1 commit into
vanloctech:mainfrom
anhtahaylove:pr/open-file-location-command

Conversation

@anhtahaylove

Copy link
Copy Markdown
Contributor

Summary

  • Add a small frontend openFileLocation() helper that calls the existing open_file_location Tauri command.
  • Route queue and processing "Show/Open in folder" actions through that helper instead of calling revealItemInDir directly.
  • Keep the change intentionally smaller than the broader ProcessingContext diff in fix(ui): show-in-folder button does nothing on macOS #94.

Why

The app already has platform-aware Rust handling for open_file_location. Reusing that command keeps reveal behavior centralized while avoiding extra frontend context churn.

Tested

  • biome check targeted to changed files
  • bun run tsc -b
  • cargo check in src-tauri after restoring the bundled yt-dlp binary in the clean Windows worktree
  • Manual Windows custom-build check: downloaded sample-5s.mp4, clicked Show in folder, Explorer opened the containing Downloads folder

Notes

Full repo Biome on this Windows PR worktree is noisy because unrelated untouched files are checked out with CRLF line endings. The changed files pass targeted Biome after normalization.

Related: #94

The frontend still called the opener plugin directly in several queue and processing surfaces even though the backend already exposes an open_file_location command with platform-specific reveal behavior. This keeps the UI on the app command boundary while avoiding the broader ProcessingContext rewrite from the larger upstream PR.

Constraint: Upstream already registers open_file_location in Rust, so the frontend can reuse that command without adding backend surface area.

Rejected: Port PR vanloctech#94 wholesale | it pulls a larger ProcessingContext diff than needed for the Windows reveal fix.

Confidence: high

Scope-risk: narrow

Directive: Keep file reveal UI actions routed through this helper unless the backend command is removed or renamed.

Tested: biome targeted check for changed files; bun run tsc -b; cargo check in src-tauri after restoring the bundled yt-dlp binary; manual Show in folder on Windows custom build with a real downloaded sample-5s.mp4 file.

Not-tested: macOS Finder reveal behavior; full Biome check in the clean Windows PR worktree because unrelated CRLF diagnostics affect untouched files.
@vanloctech vanloctech merged commit 7d88b1b into vanloctech:main Jul 3, 2026
3 checks passed
@anhtahaylove anhtahaylove deleted the pr/open-file-location-command branch July 4, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants